<%--
  Created by IntelliJ IDEA.
  User: xiaoziyan
  Date: 2022/2/15
  Time: 22:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html lang="zh-CN">

<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>

    <!-- 1. 导入CSS的全局样式 -->
    <link href="${pageContext.request.contextPath}/css/bootstrap.css" rel="stylesheet">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/layui/css/layui.css">
    <!-- 2. jQuery导入，建议使用1.9以上的版本 -->
    <script src="${pageContext.request.contextPath}/js/jquery-3.6.0.js"></script>
    <!-- 3. 导入bootstrap的js文件 -->
    <script src="${pageContext.request.contextPath}/js/bootstrap.js"></script>
    <script src="${pageContext.request.contextPath}/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript">

    </script>
    <style>
        .select_table {
            background-color: #F0F8FF;
            appearance:none;
            -moz-appearance:none;
            -webkit-appearance:none;
            -ms-appearance:none;
        }
    </style>
</head>
<body>
<div class="container" style="width: 400px; margin-top: 10%">
    <h3 style="text-align: center;">修改项目信息</h3>
    <form class="layui-form" action="${pageContext.request.contextPath}/upProjectServlet" method="post">

        <%--隐藏提交id--%>
        <input type="hidden" name="project_id" value="${project.project_id}">
        <div class="form-group">
            <label for="project_name">项目名称：</label>
            <input type="text" name="project_name" class="form-control" lay-verify="required" lay-reqtext="项目名称不能为空" id="project_name" value="${project.project_name}"/>
        </div>

        <div class="form-group">
            <label for="project_location">项目地址：</label>
            <input type="text" name="project_location" class="form-control" lay-verify="required" lay-reqtext="项目地址不能为空" id="project_location"value="${project.project_location}"/>
        </div>
        <hr/>
        <div class="form-group" style="text-align: center;">
            <%--<a class="btn btn btn-primary" id="loginBt" >登录</a>--%>
            <input type="reset" class="btn btn btn-primary" value="重置" >
            <input type="submit" class="btn btn btn-primary" lay-submit="" value="修改" >
            <input type="button" class="btn btn btn-primary" value="返回" onclick="window.location.href='${pageContext.request.contextPath}/allProjectServlet';" >

        </div>
    </form>

    <!-- 出错显示的信息框 -->
    <c:if test="${addError !=null}">
        <div class="alert alert-warning alert-dismissible" role="alert" id="login_error">
            <button type="button" class="close" data-dismiss="alert" >
                <span>&times;</span></button>
            <strong>${addError}</strong>
        </div>
    </c:if>



</div>
<script type="text/javascript">

    layui.use(['layer'], function() {
        var layer = layui.layer
            , $ = layui.$;
        //弹出框
        <c:if test="${success !=null}">
        layer.open({
            type: 1
            , offset: 'auto' //垂直水平居中
            //,id: 'layerDemo'+type //防止重复弹出
            , content: '<div style="padding: 20px 100px;">' + '添加成功' + '</div>'
            , btn: '关闭'
            , btnAlign: 'c' //按钮居中
            , shade: 0 //不显示遮罩
            ,type:1
            ,time:2000
            , yes: function () {
                layer.closeAll();
            }
        });
        </c:if>
    });


</script>


</body>
</html>
